﻿using System.Collections.Generic;
using Shuba.Model;

namespace Shuba.Business
{
    public class Cluster
    {
        private Data.Cluster cluster;

        public Cluster()
        {
            cluster = new Data.Cluster();
        }

        public List<ClusterInfo> GetClusterRelation(string clusterID)
        {
            return cluster.GetDependency(clusterID);
        }

        public List<ClusterInfo> GetListByHO(string HO_ID, string REGIONAL_ID)
        {
            return cluster.GetListByHO(HO_ID, REGIONAL_ID);
        }

        public List<ClusterInfo> GetListByRegion(string RegionalID, string CostCenter, string Nip, string AppID)
        {
            return cluster.GetListByRegion(RegionalID, CostCenter, Nip, AppID);
        }

        public List<ClusterInfo> GetListByRegion(string RegionalID)
        {
            return cluster.GetListByRegion(RegionalID);
        }
        
        public List<ClusterInfo> GetListByUnit(string BRANCH_ID)
        {
            return cluster.GetListByUnit(BRANCH_ID);
        }

        public List<ClusterInfo> GetListByRegionAndUnit(string RegionalID, string UnitCode)
        {
            return cluster.GetListByRegionAndUnit(RegionalID, UnitCode);
        }

        public string GetClusterIDByUnit(string UnitCode)
        {
            return cluster.GetClusterIDByUnit(UnitCode);
        }

        public ClusterInfo GetApprovalByID(string id)
        {
            return cluster.GetApprovalByID(id);
        }

        public List<ClusterInfo> GetList(string value, string CostCenter, string Nip)
        {
            return cluster.GetList(value, CostCenter, Nip);
        }

        public List<ClusterInfo> GetListApproval(string value, string UpdateBy)
        {
            return cluster.GetClusterApproval(value, UpdateBy.TrimEnd());
        }

        public ClusterInfo Get(string id)
        {
            return cluster.Get(id);
        }

        public void Save(ClusterInfo clusterInfo)
        {
            cluster.Save(clusterInfo);
        }
   
        public void Approve(string clusterId, string ActType)
        {
            cluster.Approve(clusterId, ActType);
        }

        public void Reject(string clusterId)
        {
            cluster.Reject(clusterId);
        }
    }
}
